|
|
@@ -20,8 +20,8 @@ describe Agents::TwilioAgent do
|
20
|
20
|
@event.save!
|
21
|
21
|
|
22
|
22
|
@sent_messages = []
|
23
|
|
- stub.any_instance_of(Agents::TwilioAgent).send_message { |message| @sent_messages << message}
|
24
|
|
- stub.any_instance_of(Agents::TwilioAgent).make_call {}
|
|
23
|
+ stub.any_instance_of(Twilio::REST::Messages).create { |message| @sent_messages << message[:body]}
|
|
24
|
+ stub.any_instance_of(Twilio::REST::Calls).create
|
25
|
25
|
end
|
26
|
26
|
|
27
|
27
|
describe '#receive' do
|
|
|
@@ -51,7 +51,6 @@ describe Agents::TwilioAgent do
|
51
|
51
|
@checker.receive([@event])
|
52
|
52
|
expect(@checker.memory[:pending_calls]).not_to eq({})
|
53
|
53
|
end
|
54
|
|
-
|
55
|
54
|
end
|
56
|
55
|
|
57
|
56
|
describe '#working?' do
|